<?php
/**
 * @CopyRight  (C)2006-2011 OE Development team Inc.
 * @WebSite    www.phpcoo.com，www.oecms.cn
 * @Author     XiangFeng <phpzac@foxmail.com>
 * @Brief      OEcms v3.x
 * @Update     2011.09.01
 * @Id         新闻资讯列表
**/
if(!defined('ALLOWGUEST')) {
	exit('Access Denied');
}

/* params */
$page		= Core_Fun::detect_number(Core_Fun::rec_post("page"),1);
$pagesize	= $config['newspagesize'];
if($page<1){$page=1;}

/* volist */
$searchsql	= " WHERE isopen != 1 AND flag = 1";
$countsql	= "SELECT COUNT(bookid) FROM ".DB_PREFIX."guestbook".$searchsql;
$total		= $db->fetch_count($countsql);
$pagecount	= ceil($total/$pagesize);
$nextpage	= $page+1;
$prepage	= $page-1;
$start		= ($page-1)*$pagesize;
$sql		= "SELECT * FROM ".DB_PREFIX."guestbook".
		          $searchsql." ORDER BY bookid DESC LIMIT $start, $pagesize";
$book	= $db->getall($sql);
$i			= 1;
foreach($book as $key=>$value){
	
}


/* page */
$url = PATH_URL."page.php?mod=guestbooklist";
$channel	= "book";
$showpage	= Core_Page::volistpage($channel,0,$total,$pagesize,$page,$url,10);


if($page>1){
	$page_title .= "-第".$page."页";
}


$tpl->assign("showpage",$showpage);
$tpl->assign("total",$total);
$tpl->assign("page",$page);
$tpl->assign("pagecount",$pagecount);
$tpl->assign("pagesize",$config['newspagesize']);//
$tpl->assign("book",$book);
$tpl->assign("navurl",$navurl);
$tpl->assign("navigation",$navigation);
$tpl->assign("navcatname",$navcatname);
$tpl->assign("page_title",$page_title."-".$config['sitename']);
$tpl->assign("page_keyword",$page_keyword);
$tpl->assign("page_description",$page_description);
?>